// testSVGDlg.h : header file
//

#if !defined(AFX_TESTSVGDLG_H__D9395DAA_7FA6_441B_B57E_FDAEEE8B2AAB__INCLUDED_)
#define AFX_TESTSVGDLG_H__D9395DAA_7FA6_441B_B57E_FDAEEE8B2AAB__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



#define WM_UPDATEWEBSITEPROGRESS WM_USER + 5
#define WM_THREADWEBSITEFINISHED WM_USER + 6
#define WM_UPDATEALLPATHWAYSPROGRESS WM_USER + 7
#define WM_THREADALLPATHWAYSFINISHED WM_USER + 8
#define WM_UPDATE_MOTIFS_SEARCH_PROGRESS WM_USER + 9
#define WM_THREAD_MOTIFS_SEARCH_FINISHED WM_USER + 10
#define WM_UPDATE_BASED_ON_CONNECTIVITY_PROGRESS WM_USER + 11
#define WM_THREAD_BASED_ON_CONNECTIVITY_FINISHED WM_USER + 12
#define WM_UPDATE_FROM_SOURCE_NODES_PROGRESS WM_USER + 13
#define WM_THREAD_FROM_SOURCE_NODES_FINISHED WM_USER + 14
#define WM_UPDATE_SHUFFLED_PROGRESS WM_USER + 15
#define WM_THREAD_SHUFFLED_FINISHED WM_USER + 16
#define WM_THREAD_PROCESS_LIST_PROGRESS WM_USER + 17
#define WM_THREAD_PROCESS_LIST_FINISHED WM_USER + 18

#define EXTRACELLULAR_LIGANDS	1
#define TRANSMEMBRANE			2
#define CENTRAL_SIGNALING		3
#define TRANSMISSION			4
#define CYTOSKELETON			5
#define SECRETION				6
#define APOPTOSIS				7
#define TRANSLATION				8
#define TRANSCRIPTION			9


// Data types 
typedef struct MOLECULE
{
    int linksCount;
	int inLinksCount;
	int outLinksCount;
	int positiveLinksCount;
	int negativeLinksCount;
	int positiveInLinksCount;
	int negativeInLinksCount;
	int positiveOutLinksCount;
	int negativeOutLinksCount;
	int neutralLinksCount;
	int totalLinksCount;
    int number;
    int strongHomologs;
	int weakHomologs;
	int simTotal;
	int simulationInPositiveBucket;
	int simulationInNegativeBucket;
	int simulationOutBucket;
	char name[100];
	char accHuman[100];
	char accMouse[100];
	int linksTo[300];
	char location[100];
	int machine;
	char moleculeType[100];
	double avgPathLength;
	double allPathLengths[10000];
	double cc;
	double gc;
	char moleculeList[20];

	double distanceToCues;
	double distanceToTranscription;
	double distanceToTranslation;
	double distanceToMotility;
	double distanceToChannels;
	double distanceToVesicles;

	int numberOfDownstreamEffectors;
	double bestXLocation;
	double bestYLocation;
	int visited;
	int visited2;
	bool visitedGlu;
	int appearInFeedbackLoops;
	int appearInFeedforwardLoops;
	int appearInBifans;
	float appearInTotal;

    struct MOLECULE* next;

} MOLECULE;

typedef struct REFERENCE
{
    int number;
    char authors[2000];
	char title[2000];
	char publication[2000];
    char url[2000];

	struct REFERENCE* next;
} REFERENCE;

typedef struct INTERACTION
{
    int number;
	int flag;
    char source[200];
	char sourceAccHuman[100];
	char sourceAccMouse[100];
	char sourceLocation[200];
	char sourceType[200];
	char target[200];
	char targetAccHuman[100];
	char targetAccMouse[100];
	char targetLocation[200];
	char targetType[200];
	char effect[100];
	char sourceList[20];
	char targetList[20];
	char typeOfInteraction[200];
	int pmid;
	int referenceCount;
	int references[300];
    struct INTERACTION* next;

} INTERACTION;

typedef struct COLORS_AND_SHAPES
{
	char name[200];
	char color[200];
	char shape[200];
	struct COLORS_AND_SHAPES* next;

} COLORS_AND_SHAPES;

typedef struct MOTIF3
{
	int count;	
	int randomCount;
	int randomCounts[100];
	double randomAverage;
	double randomSD;
	int visited;
	char name1[200];
	char name2[200];
	char name3[200];
	char type1[200];
	char type2[200];
	char type3[200];
	char typeOfInteraction1[200];
	char typeOfInteraction2[200];
	char typeOfInteraction3[200];
	char effect1[100];
	char effect2[100];
	char effect3[100];
	int direction1;
	int direction2;
	int direction3;
	int type;
	int sign;
	struct MOTIF3* next;

} MOTIF3;

typedef struct MOTIF4
{
	int count;
	int randomCount;
	int randomCounts[100];
	double randomAverage;
	double randomSD;
	int visited;
	char name1[200];
	char name2[200];
	char name3[200];
	char name4[200];
	char typeOfInteraction1[200];
	char typeOfInteraction2[200];
	char typeOfInteraction3[200];
	char typeOfInteraction4[200];
	char effect1[100];
	char effect2[100];
	char effect3[100];
	char effect4[100];
	int direction1;
	int direction2;
	int direction3;
	int direction4;
	int type;
	int sign;
	struct MOTIF4* next;
	
} MOTIF4;

typedef struct MOTIF5
{
	int count;
	int randomCount;
	int randomCounts[100];
	double randomAverage;
	double randomSD;
	int visited;
	char name1[200];
	char name2[200];
	char name3[200];
	char name4[200];
	char name5[200];
	char typeOfInteraction1[200];
	char typeOfInteraction2[200];
	char typeOfInteraction3[200];
	char typeOfInteraction4[200];
	char typeOfInteraction5[200];
	char effect1[100];
	char effect2[100];
	char effect3[100];
	char effect4[100];
	char effect5[100];
	int direction1;
	int direction2;
	int direction3;
	int direction4;
	int direction5;
	struct MOTIF5* next;
	
} MOTIF5;

typedef struct VISIO_SHAPE
{
	char moleculeType[200];
	char shape[200];
	struct VISIO_SHAPE* next;
} VISIO_SHAPE;

typedef struct PATHWAY_GENERATOR_SETUP
{
	CString sourceCondName1;
	CString sourceCondName2;
	CString sourceCondName3;
	CString sourceCondName4;
	CString targetCondName1;
	CString targetCondName2;
	CString targetCondName3;
	CString targetCondName4;

	CString sourceCondType1;
	CString sourceCondType2;
	CString sourceCondType3;
	CString sourceCondType4;
	CString targetCondType1;
	CString targetCondType2;
	CString targetCondType3;
	CString targetCondType4;

	int directOnly;
	int numberOfSteps;
	int maxSize;

} PATHWAY_GENERATOR_SETUP;

typedef struct MOTIFS_CHOICES
{
	int m_FBL3;
	int m_FBL4;

	int m_FFL3;
	int m_FFL4;
	
	int m_Bifans;
	int m_Scaffolds;

} MOTIFS_CHOICES;

typedef struct FROM_SOURCES_CHOICES
{
	int steps;
	CString type;
	CString name;
	CString direction;
} FROM_SOURCES_CHOICES;

/////////////////////////////////////////////////////////////////////////////
// CTestSVGDlg dialog

class CTestSVGDlg : public CDialog
{
// Construction
public:
	CTestSVGDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTestSVGDlg)
	enum { IDD = IDD_TESTSVG_DIALOG };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestSVGDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CTestSVGDlg)
//	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void OnButtonLoadNetwork();
	afx_msg void OnButtonCreateWebSite();
	afx_msg void OnButtonViewer();
	afx_msg void OnButtonSaveAs();
	afx_msg void OnButton2();
	afx_msg void OnButtonLoadTwoColumn();
	afx_msg void OnButton3();
	afx_msg void OnButton4();
	afx_msg void OnButtonNet();
	afx_msg void OnButtonRandom();
	afx_msg void OnButtonRandomSign();
	afx_msg void OnButtonInteractionsMatrix();
	afx_msg void OnButtonAddPhosphatases();
	afx_msg void OnButtonMotifsInput();
	afx_msg void OnButtonRandom100();
	afx_msg void OnButton10();
	afx_msg void OnButtonFigure3();
	afx_msg void OnButtonPubmed();
	afx_msg void OnButtonIslands();
	afx_msg void OnButtonRemoveSelective();
	afx_msg void OnButtonRandomIslands();
	afx_msg void OnButtonRandomOneIsland();
	afx_msg void OnButtonRandomIslandsNets();
	afx_msg void OnButtonSubVisioMaps();
	afx_msg void OnButtonSimGluAndNe();
	afx_msg void OnButtonFindBidirect();
	afx_msg void OnButtonPathToNucleus();
	afx_msg void OnButtonList();
	afx_msg void OnButtonDetailedList();
	afx_msg void OnButtonCountFeedBackLoops();
	afx_msg void OnButtonCountFeedforwardLoops();
	afx_msg void OnButtonDistanceToMachines();
	afx_msg void OnButtonMapBasedOnMachines();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	afx_msg LRESULT OnThreadWebSiteFinished(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUpdateWebSiteProgress(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnThreadAllPathwaysFinished(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUpdateAllPathwaysProgress(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnThreadMotifsSearchFinished(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUpdateMotifsSearchProgress(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnThreadBasedOnConnectivityFinished(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUpdateBasedOnConnectivityProgress(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnThreadFromSourceNodesFinished(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUpdateFromSourceNodesProgress(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnThreadShuffledFinished(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUpdateShuffledProgress(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnThreadProcessListFinished(WPARAM wParam, LPARAM lParam);
	afx_msg LRESULT OnUpdateProcessListProgress(WPARAM wParam, LPARAM lParam);

public:
	afx_msg void OnBnClickedButtonDiffMaps();
	afx_msg void OnBnClickedButtonMachineCount();
	afx_msg void OnBnClickedButton12();
	afx_msg void OnBnClickedButtonDumpMachinesAndAccessions();
	afx_msg void OnBnClickedButton11();
	afx_msg void OnBnClickedButton13();
	afx_msg void OnBnClickedButtonProgressReport();
	afx_msg void OnBnClickedButton14();
	afx_msg void OnBnClickedButton15();
	afx_msg void OnBnClickedButtonIndexInteractions();
	afx_msg void OnStnClickedStaticProgress();
	afx_msg void OnBnClickedButton17();
	afx_msg void OnBnClickedButton18();
	afx_msg void OnBnClickedButton19();
	afx_msg void OnBnClickedButton20();
	afx_msg void OnBnClickedButton21();
	afx_msg void OnBnClickedButton22();
	afx_msg void OnBnClickedButton23();
	afx_msg void OnBnClickedButton24();
	afx_msg void OnBnClickedButton25();
	afx_msg void OnBnClickedButton26();
	afx_msg void OnBnClickedButton27();
	afx_msg void OnBnClickedButton28();
	afx_msg void OnBnClickedButton29();
	afx_msg void OnBnClickedButtonCreateAndDrawPathways();
	afx_msg void OnBnClickedButtonValidate();
	afx_msg void OnBnClickedButton5();
	CDC dcMemoryImage;
	CBitmap Bitmap;
	void DrawImageInMemory(int column, int* string, int stringSize, CDC* dcMemory);
	afx_msg void OnBnClickedButton30();
	afx_msg void OnBnClickedButtonGeneratePathway();
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedButtonMotifs();
	void ShutOffAllButtons();
	void TurnOnAllButtons();
	afx_msg void OnBnClickedButtonBasedOnConnectivity();
	afx_msg void OnBnClickedButtonFromSourceNodes();
	int LoadUserSetting();
//	virtual BOOL OnInitDialog();
	afx_msg void OnBnClickedButtonShuffledNetworks();
	afx_msg void OnBnClickedButtonInteractionMatrix();
	afx_msg void OnBnClickedButtonCreateWebSite2();
	afx_msg void OnBnClickedButtonGeneList();
	afx_msg void OnBnClickedButtonGeneListHelp();
	afx_msg void OnBnClickedButtonSif();
	afx_msg void OnBnClickedButtonSaveAsHelp();
	afx_msg void OnBnClickedButtonTwoColumnHelp();
	afx_msg void OnBnClickedButtonRandomHelp();
	afx_msg void OnBnClickedButtonMfinderHelp();
	afx_msg void OnBnClickedButtonMotifsInput();
	afx_msg void OnBnClickedButtonValidateHelp();
	afx_msg void OnBnClickedButtonPsiMi();
	afx_msg void OnBnClickedButtonDumpClusterHelp();
	afx_msg void OnBnClickedButtonSifHelp2();
	afx_msg void OnBnClickedButtonSifHelp();
	afx_msg void OnBnClickedButtonPajekHelp();
	afx_msg void OnBnClickedButtonGraphvizHelp();
	afx_msg void OnBnClickedButtonPgHelp();
	afx_msg void OnBnClickedButtonMatrixHelp();
	afx_msg void OnBnClickedButtonMotifsHelp();
	afx_msg void OnBnClickedButtonSubnet1Help();
	afx_msg void OnBnClickedButtonSubnets2Help();
	virtual BOOL OnInitDialog();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TESTSVGDLG_H__D9395DAA_7FA6_441B_B57E_FDAEEE8B2AAB__INCLUDED_)
